package cn.naughtior.shch.utils;

import com.rabbitmq.client.BlockedListener;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * ${DESCRIPTION}
 *
 * @author shitou<shitou@in66.com>
 * @create 2017-01-16 14:16
 */

public class JiuyanRabbitMqBlockedListener implements BlockedListener{

    @Override
    public void handleBlocked(String reason) throws RuntimeException {
        System.out.println("----------------sss--------------------");
        System.out.println(reason);
        throw new RuntimeException();
    }

    @Override
    public void handleUnblocked() throws IOException {
        System.out.println("hhhh");
    }
}
